package com.journaldev.spring.service;

import java.util.List;

import com.journaldev.spring.dao.PatientDAO;
import com.journaldev.spring.dao.PersonalOfficeDAO;
import com.journaldev.spring.model.Patient;

public class PatientServiceImpl implements PatientService {
	
	public PatientDAO patientDAO;

	public PatientDAO getPatientDAO() {
		return patientDAO;
	}

	public void setPatientDAO(PatientDAO patientDAO) {
		this.patientDAO = patientDAO;
	}

	@Override
	public void addPatient(Patient p) {
		// TODO Auto-generated method stub
		this.patientDAO.addPatient(p);
	}

	@Override
	public void updatePatient(Patient p) {
		// TODO Auto-generated method stub
		this.patientDAO.updatePatient(p);
	}

	@Override
	public List<Patient> listPatient() {
		// TODO Auto-generated method stub
		return this.patientDAO.listPatient();
	}

	@Override
	public Patient getPatientById(int id) {
		// TODO Auto-generated method stub
		return this.patientDAO.getPatientById(id);
	}

	@Override
	public void removePatient(int id) {
		// TODO Auto-generated method stub
		this.patientDAO.removePatient(id);
	}

}
